package xyz.thoughtset.viewer.common.crud.core.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.thoughtset.viewer.common.core.entity.IdMeta;

import java.util.LinkedHashMap;
import java.util.List;

public interface BaseService<T extends IdMeta> extends IService<T>{
    public Object createData(LinkedHashMap<String, Object> baseMap);


    public Object updateData(LinkedHashMap<String, Object> baseMap);

    public Object saveData(LinkedHashMap<String, Object> baseMap);
    public T saveData(T data);

    public void deleteByPId(String pid);
    public boolean deleteById(String pkey);
    public T selectDetail(String pkey);
    public T selectByPId(String pid);
    public List listByPId(String pid);
    public Page selectPage(Page page, LinkedHashMap<String, Object> baseMap);

    List selectList(LinkedHashMap<String, Object> baseMap);
}
